package modelImp;

import java.awt.Point;

import model.ModelConstraint;
import model.ModelPawn;
import model.ModelPosition;

public class Position extends ModelPosition{

	public Position(Pawn pawn, ModelConstraint t,Point point){
		this.constraint = t;
		this.point = point;
		this.pawn = pawn;
	}

	@Override
	// TODO : Attention on peu mettre 2 joueurs sur le meme chemin
	public boolean canPutPawn() {
		if(this.constraint.getPlayers().size() == 0 ){
			return true;
		}
			
		return false;
	}
	
	@Override
	public void setPawn(ModelPawn pawn) {
		super.setPawn(pawn);
		this.getConstraint().getPlayers().add(pawn.getPlayer());
	}

}
